From 09b050c77fbb1c6be6b8549d5a421d8030127e93 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Mon, 8 Dec 2003 08:14:58 +0000 Subject: [PATCH] bitkeeper revision 1.645 (3fd43302Q7iIIXRlzLUoi_opKLWYIg) Many files: new file Makefile: New SCSI driver for sym53c8xx --- .rootkeys | 18 + xen/drivers/scsi/Makefile | 4 +- xen/drivers/scsi/sym53c8xx_2/ChangeLog.txt | 148 + .../scsi/sym53c8xx_2/Documentation.txt | 1149 ++++ xen/drivers/scsi/sym53c8xx_2/Makefile | 18 + xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h | 375 + xen/drivers/scsi/sym53c8xx_2/sym_conf.h | 329 + xen/drivers/scsi/sym53c8xx_2/sym_defs.h | 957 +++ xen/drivers/scsi/sym53c8xx_2/sym_fw.c | 617 ++ xen/drivers/scsi/sym53c8xx_2/sym_fw.h | 232 + xen/drivers/scsi/sym53c8xx_2/sym_fw1.h | 1874 +++++ xen/drivers/scsi/sym53c8xx_2/sym_fw2.h | 1994 ++++++ xen/drivers/scsi/sym53c8xx_2/sym_glue.c | 3049 +++++++++ xen/drivers/scsi/sym53c8xx_2/sym_glue.h | 683 ++ xen/drivers/scsi/sym53c8xx_2/sym_hipd.c | 6021 +++++++++++++++++ xen/drivers/scsi/sym53c8xx_2/sym_hipd.h | 1446 ++++ xen/drivers/scsi/sym53c8xx_2/sym_malloc.c | 421 ++ xen/drivers/scsi/sym53c8xx_2/sym_misc.c | 336 + xen/drivers/scsi/sym53c8xx_2/sym_misc.h | 311 + xen/drivers/scsi/sym53c8xx_2/sym_nvram.c | 730 ++ 20 files changed, 20711 insertions(+), 1 deletion(-) create mode 100644 xen/drivers/scsi/sym53c8xx_2/ChangeLog.txt create mode 100644 xen/drivers/scsi/sym53c8xx_2/Documentation.txt create mode 100644 xen/drivers/scsi/sym53c8xx_2/Makefile create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_conf.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_defs.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_fw.c create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_fw.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_fw1.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_fw2.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_glue.c create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_glue.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_hipd.c create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_hipd.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_malloc.c create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_misc.c create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_misc.h create mode 100644 xen/drivers/scsi/sym53c8xx_2/sym_nvram.c diff --git a/.rootkeys b/.rootkeys index 23ce80d113..1d7ee6c8e1 100644 --- a/.rootkeys +++ b/.rootkeys @@ -326,6 +326,24 @@ 3ddb79beC6PIqDEaxAfO3bLKcmMLeA xen/drivers/scsi/scsicam.c 3ddb79bedAG8DPsr3S1N4IASxUuBug xen/drivers/scsi/sd.c 3ddb79beA27dAK0xtNh4k6SJniKnlA xen/drivers/scsi/sd.h +3fd432fb0fW430_7mzTegOyjjFB-Iw xen/drivers/scsi/sym53c8xx_2/ChangeLog.txt +3fd432fbzXmGBq60nilWbfafyDXrtQ xen/drivers/scsi/sym53c8xx_2/Documentation.txt +3fd432fbVpHp1vv8A6GQBZQnKMFS7Q xen/drivers/scsi/sym53c8xx_2/Makefile +3fd432fbAOAdNUuPUOlRmT723POpnQ xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h +3fd432fbO-kotluBDNXwt3AJ_yiuAw xen/drivers/scsi/sym53c8xx_2/sym_conf.h +3fd432fbFiHM-XyIhDIU3wLuVTEe8Q xen/drivers/scsi/sym53c8xx_2/sym_defs.h +3fd432fbc6E0FNW2CfDhY18WV4fIcA xen/drivers/scsi/sym53c8xx_2/sym_fw.c +3fd432fbEYdbqLET81nisgPiVVlRtA xen/drivers/scsi/sym53c8xx_2/sym_fw.h +3fd432fbiymG2mfG5k2HHz1w1hPcHQ xen/drivers/scsi/sym53c8xx_2/sym_fw1.h +3fd432fbITAwK8BK6-6c8yPfxpxROg xen/drivers/scsi/sym53c8xx_2/sym_fw2.h +3fd432fbr5_OuwNUNPjLfbDdS9iMLw xen/drivers/scsi/sym53c8xx_2/sym_glue.c +3fd432fbRLKL6mW2K5n_pHiTnMxA3Q xen/drivers/scsi/sym53c8xx_2/sym_glue.h +3fd432fbkCURaCXa7kKXvnHI1Y0B6A xen/drivers/scsi/sym53c8xx_2/sym_hipd.c +3fd432fbpPgJcz6YrCxWNx934bK7BQ xen/drivers/scsi/sym53c8xx_2/sym_hipd.h +3fd432fbHyYMzfNAB_5mKGOvh1HTrg xen/drivers/scsi/sym53c8xx_2/sym_malloc.c +3fd432fbFBLr85q2xIgdvDR7S2kvlw xen/drivers/scsi/sym53c8xx_2/sym_misc.c +3fd432fbOri8Ue9-QTi6X-WviC2JYA xen/drivers/scsi/sym53c8xx_2/sym_misc.h +3fd432fbM9qma6nz_-GWRpZ7v1pqrg xen/drivers/scsi/sym53c8xx_2/sym_nvram.c 3ddb79c3l4IiQtf6MS2jIzcd-hJS8g xen/include/asm-i386/apic.h 3ddb79c3QJYWr8LLGdonLbWmNb9pQQ xen/include/asm-i386/apicdef.h 3ddb79c3OiG9eTsi9Dy3F_OkuRAzKA xen/include/asm-i386/atomic.h diff --git a/xen/drivers/scsi/Makefile b/xen/drivers/scsi/Makefile index a23accb5e3..cdce09cd40 100644 --- a/xen/drivers/scsi/Makefile +++ b/xen/drivers/scsi/Makefile @@ -6,14 +6,16 @@ SCSI_OBJS := scsi.o hosts.o scsicam.o scsi_dma.o scsi_error.o SCSI_OBJS += scsi_ioctl.o scsi_lib.o scsi_merge.o scsi_proc.o SCSI_OBJS += scsi_queue.o scsi_scan.o scsi_syms.o scsi_obsolete.o SCSI_OBJS += constants.o sd.o aacraid/aacraid.o aic7xxx/aic7xxx.o -SCSI_OBJS += megaraid.o BusLogic.o +SCSI_OBJS += megaraid.o BusLogic.o sym53c8xx_2/sym53c8xx.o default: $(OBJS) $(MAKE) -C aacraid $(MAKE) -C aic7xxx + $(MAKE) -C sym53c8xx_2 $(LD) -r -o driver.o $(SCSI_OBJS) clean: $(MAKE) -C aacraid clean $(MAKE) -C aic7xxx clean + $(MAKE) -C sym53c8xx_2 clean rm -f *.o *~ core diff --git a/xen/drivers/scsi/sym53c8xx_2/ChangeLog.txt b/xen/drivers/scsi/sym53c8xx_2/ChangeLog.txt new file mode 100644 index 0000000000..6a4a3f8550 --- /dev/null +++ b/xen/drivers/scsi/sym53c8xx_2/ChangeLog.txt @@ -0,0 +1,148 @@ +Sat Dec 30 21:30 2000 Gerard Roudier + * version sym-2.1.0-20001230 + - Initial release of SYM-2. + +Mon Jan 08 21:30 2001 Gerard Roudier + * version sym-2.1.1-20010108 + - Change a couple of defines containing ncr or NCR by their + equivalent containing sym or SYM instead. + +Sun Jan 14 22:30 2001 Gerard Roudier + * version sym-2.1.2-20010114 + - Fix a couple of printfs: + * Add the target number to the display of transfer parameters. + * Make the display of TCQ and queue depth clearer. + +Wed Jan 17 23:30 2001 Gerard Roudier + * version sym-2.1.3-20010117 + - Wrong residual values were returned in some situations. + This broke cdrecord with linux-2.4.0, for example. + +Sat Jan 20 18:00 2001 Gerard Roudier + * version sym-2.1.4-20010120 + - Add year 2001 to Copyright. + - A tiny bug in the dma memory freeing path has been fixed. + (Driver unload failed with a bad address reference). + +Wed Jan 24 21:00 2001 Gerard Roudier + * version sym-2.1.5-20010124 + - Make the driver work under Linux-2.4.x when statically linked + with the kernel. + - Check against memory allocation failure for SCRIPTZ and add the + missing free of this memory on instance detach. + - Check against GPIO3 pulled low for HVD controllers (driver did + just the opposite). + Misdetection of BUS mode was triggerred on module reload only, + since BIOS settings were trusted instead on first load. + +Wed Feb 7 21:00 2001 Gerard Roudier + * version sym-2.1.6-20010207 + - Call pci_enable_device() as wished by kernel maintainers. + - Change the sym_queue_scsiio() interface. + This is intended to simplify portability. + - Move the code intended to deal with the dowloading of SCRIPTS + from SCRIPTS :) in the patch method (was wrongly placed in + the SCRIPTS setup method). + - Add a missing cpu_to_scr() (np->abort_tbl.addr) + - Remove a wrong cpu_to_scr() (np->targtbl_ba) + - Cleanup a bit the PPR failure recovery code. + +Sat Mar 3 21:00 2001 Gerard Roudier + - Add option SYM_OPT_ANNOUNCE_TRANSFER_RATE and move the + corresponding code to file sym_misc.c. + Also move the code that sniffes INQUIRY to sym_misc.c. + This allows to share the corresponding code with NetBSD + without polluating the core driver source (sym_hipd.c). + - Add optionnal code that handles IO timeouts from the driver. + (not used under Linux, but required for NetBSD) + - Donnot assume any longer that PAGE_SHIFT and PAGE_SIZE are + defined at compile time, as at least NetBSD uses variables + in memory for that. + - Refine a work-around for the C1010-33 that consists in + disabling internal LOAD/STORE. Was applied up to revision 1. + Is now only applied to revision 0. + - Some code reorganisations due to code moves between files. + +Tues Apr 10 21:00 2001 Gerard Roudier + * version sym-2.1.9-20010412 + - Reset 53C896 and 53C1010 chip according to the manual. + (i.e.: set the ABRT bit in ISTAT if SCRIPTS are running) + - Set #LUN in request sense only if scsi version <= 2 and + #LUN <= 7. + - Set busy_itl in LCB to 1 if the LCB is allocated and a + SCSI command is active. This is a simplification. + - In sym_hcb_free(), donnot scan the free_ccbq if no CCBs + has been allocated. This fixes a panic if attach failed. + - Add DT/ST (double/simple transition) in the transfer + negotiation announce. + - Forces the max number of tasks per LUN to at least 64. + - Use pci_set_dma_mask() for linux-2.4.3 and above. + - A couple of comments fixes. + +Wed May 22:00 2001 Gerard Roudier + * version sym-2.1.10-20010509 + - Mask GPCNTL against 0x1c (was 0xfc) for the reading of the NVRAM. + This ensure LEDC bit will not be set on 896 and later chips. + Fix sent by Chip Salzenberg . + - Define the number of PQS BUSes supported. + Fix sent by Stig Telfer + - Miscellaneous common code rearrangements due to NetBSD accel + ioctl support, without impact on Linux (hopefully). + +Mon July 2 12:00 2001 Gerard Roudier + * version sym-2.1.11-20010702 + - Add Tekram 390 U2B/U2W SCSI LED handling. + Submitted by Chip Salzenberg + - Add call to scsi_set_pci_device() for kernels >= 2.4.4. + - Check pci dma mapping failures and complete the IO with some + error when such mapping fails. + - Fill in instance->max_cmd_len for kernels > 2.4.0. + - A couple of tiny fixes ... + +Sun Sep 9 18:00 2001 Gerard Roudier + * version sym-2.1.12-20010909 + - Change my email address. + - Add infrastructure for the forthcoming 64 bit DMA adressing support. + (Based on PCI 64 bit patch from David S. Miller) + - Donnot use anymore vm_offset_t type. + +Sat Sep 15 20:00 2001 Gerard Roudier + * version sym-2.1.13-20010916 + - Add support for 64 bit DMA addressing using segment registers. + 16 registers for up to 4 GB x 16 -> 64 GB. + +Sat Sep 22 12:00 2001 Gerard Roudier + * version sym-2.1.14-20010922 + - Complete rewrite of the eh handling. The driver is now using a + semaphore in order to behave synchronously as required by the eh + threads. A timer is also used to prevent from waiting indefinitely. + +Sun Sep 30 17:00 2001 Gerard Roudier + * version sym-2.1.15-20010930 + - Include unconditionnaly as expected by latest + kernels. + - Use del_timer_sync() for recent kernels to kill the driver timer + on module release. + +Sun Oct 28 15:00 2001 Gerard Roudier + * version sym-2.1.16-20011028 + - Slightly simplify driver configuration. + - Prepare a new patch against linux-2.4.13. + +Sat Nov 17 10:00 2001 Gerard Roudier + * version sym-2.1.17 + - Fix a couple of gcc/gcc3 warnings. + - Allocate separately from the HCB the array for CCBs hashed by DSA. + All driver memory allocations are now not greater than 1 PAGE + even on PPC64 / 4KB PAGE surprising setup. + +Sat Dec 01 18:00 2001 Gerard Roudier + * version sym-2.1.17a + - Use u_long instead of U32 for the IO base cookie. This is more + consistent with what archs are expecting. + - Use MMIO per default for Power PC instead of some fake normal IO, + as Paul Mackerras stated that MMIO works fine now on this arch. + + + + diff --git a/xen/drivers/scsi/sym53c8xx_2/Documentation.txt b/xen/drivers/scsi/sym53c8xx_2/Documentation.txt new file mode 100644 index 0000000000..713afc8f91 --- /dev/null +++ b/xen/drivers/scsi/sym53c8xx_2/Documentation.txt @@ -0,0 +1,1149 @@ +The Linux SYM-2 driver documentation file + +Written by Gerard Roudier +21 Rue Carnot +95170 DEUIL LA BARRE - FRANCE + +Decembre 28 2000 +=============================================================================== + +1. Introduction +2. Supported chips and SCSI features +3. Advantages of this driver for newer chips. + 3.1 Optimized SCSI SCRIPTS + 3.2 New features appeared with the SYM53C896 +4. Memory mapped I/O versus normal I/O +5. Tagged command queueing +6. Parity checking +7. Profiling information +8. Control commands + 8.1 Set minimum synchronous period + 8.2 Set wide size + 8.3 Set maximum number of concurrent tagged commands + 8.4 Set debug mode + 8.5 Set flag (no_disc) + 8.6 Set verbose level + 8.7 Reset all logical units of a target + 8.8 Abort all tasks of all logical units of a target +9. Configuration parameters +10. Boot setup commands + 10.1 Syntax + 10.2 Available arguments + 10.2.1 Master parity checking + 10.2.2 Scsi parity checking + 10.2.3 Default number of tagged commands + 10.2.4 Default synchronous period factor + 10.2.5 Verbosity level + 10.2.6 Debug mode + 10.2.7 Burst max + 10.2.8 LED support + 10.2.9 Max wide + 10.2.10 Differential mode + 10.2.11 IRQ mode + 10.2.12 Reverse probe + 10.2.13 Fix up PCI configuration space + 10.2.14 Serial NVRAM + 10.2.15 Check SCSI BUS + 10.2.16 Exclude a host from being attached + 10.2.17 Suggest a default SCSI id for hosts + 10.3 PCI configuration fix-up boot option + 10.4 Serial NVRAM support boot option + 10.5 SCSI BUS checking boot option +11. SCSI problem troubleshooting + 15.1 Problem tracking + 15.2 Understanding hardware error reports +12. Serial NVRAM support (by Richard Waltham) + 17.1 Features + 17.2 Symbios NVRAM layout + 17.3 Tekram NVRAM layout + +=============================================================================== + +1. Introduction + +This driver supports the whole SYM53C8XX family of PCI-SCSI controllers. +It also support the subset of LSI53C10XX PCI-SCSI controllers that are based +on the SYM53C8XX SCRIPTS language. + +It replaces the sym53c8xx+ncr53c8xx driver bundle and shares its core code +with the FreeBSD SYM-2 driver. The `glue' that allows this driver to work +under Linux is contained in 2 files named sym_glue.h and sym_glue.c. +Other drivers files are intended not to depend on the Operating System +on which the driver is used. + +The history of this driver can be summerized as follows: + +1993: ncr driver written for 386bsd and FreeBSD by: + Wolfgang Stanglmeier + Stefan Esser + +1996: port of the ncr driver to Linux-1.2.13 and rename it ncr53c8xx. + Gerard Roudier + +1998: new sym53c8xx driver for Linux based on LOAD/STORE instruction and that + adds full support for the 896 but drops support for early NCR devices. + Gerard Roudier + +1999: port of the sym53c8xx driver to FreeBSD and support for the LSI53C1010 + 33 MHz and 66MHz Ultra-3 controllers. The new driver is named `sym'. + Gerard Roudier + +2000: Add support for early NCR devices to FreeBSD `sym' driver. + Break the driver into several sources and separate the OS glue + code from the core code that can be shared among different O/Ses. + Write a glue code for Linux. + Gerard Roudier + +This README file addresses the Linux version of the driver. Under FreeBSD, +the driver documentation is the sym.8 man page. + +Information about new chips is available at LSILOGIC web server: + + http://www.lsilogic.com/ + +SCSI standard documentations are available at T10 site: + + http://www.t10.org/ + +Useful SCSI tools written by Eric Youngdale are part of most Linux +distributions: + scsiinfo: command line tool + scsi-config: TCL/Tk tool using scsiinfo + +2. Supported chips and SCSI features + +The following features are supported for all chips: + + Synchronous negotiation + Disconnection + Tagged command queuing + SCSI parity checking + PCI Master parity checking + +Other features depends on chip capabilities. +The driver notably uses optimized SCRIPTS for devices that support +LOAD/STORE and handles PHASE MISMATCH from SCRIPTS for devices that +support the corresponding feature. + +The following table shows some characteristics of the chip family. + + On board LOAD/STORE HARDWARE +Chip SDMS BIOS Wide SCSI std. Max. sync SCRIPTS PHASE MISMATCH +---- --------- ---- --------- ---------- ---------- -------------- +810 N N FAST10 10 MB/s N N +810A N N FAST10 10 MB/s Y N +815 Y N FAST10 10 MB/s N N +825 Y Y FAST10 20 MB/s N N +825A Y Y FAST10 20 MB/s Y N +860 N N FAST20 20 MB/s Y N +875 Y Y FAST20 40 MB/s Y N +875A Y Y FAST20 40 MB/s Y Y +876 Y Y FAST20 40 MB/s Y N +895 Y Y FAST40 80 MB/s Y N +895A Y Y FAST40 80 MB/s Y Y +896 Y Y FAST40 80 MB/s Y Y +897 Y Y FAST40 80 MB/s Y Y +1510D Y Y FAST40 80 MB/s Y Y +1010 Y Y FAST80 160 MB/s Y Y +1010_66* Y Y FAST80 160 MB/s Y Y + +* Chip supports 33MHz and 66MHz PCI bus clock. + + +Summary of other supported features: + +Module: allow to load the driver +Memory mapped I/O: increases performance +Control commands: write operations to the proc SCSI file system +Debugging information: written to syslog (expert only) +Scatter / gather +Shared interrupt +Boot setup commands +Serial NVRAM: Symbios and Tekram formats + + +3. Advantages of this driver for newer chips. + +3.1 Optimized SCSI SCRIPTS. + +All chips except the 810, 815 and 825, support new SCSI SCRIPTS instructions +named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register +to/from memory much faster that the MOVE MEMORY instruction that is supported +by the 53c7xx and 53c8xx family. + +The LOAD/STORE instructions support absolute and DSA relative addressing +modes. The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead +of MOVE MEMORY instructions. + +Due to the lack of LOAD/STORE SCRIPTS instructions by earlier chips, this +driver also incorporates a different SCRIPTS set based on MEMORY MOVE, in +order to provide support for the entire SYM53C8XX chips family. + +3.2 New features appeared with the SYM53C896 + +Newer chips (see above) allows handling of the phase mismatch context from +SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor +until the C code has saved the context of the transfer). + +The 896 and 1010 chips support 64 bit PCI transactions and addressing, +while the 895A supports 32 bit PCI transactions and 64 bit addressing. +The SCRIPTS processor of these chips is not true 64 bit, but uses segment +registers for bit 32-63. Another interesting feature is that LOAD/STORE +instructions that address the on-chip RAM (8k) remain internal to the chip. + +4. Memory mapped I/O versus normal I/O + +Memory mapped I/O has less latency than normal I/O and is the recommended +way for doing IO with PCI devices. Memory mapped I/O seems to work fine on +most hardware configurations, but some poorly designed chipsets may break +this feature. A configuration option is provided for normal I/O to be +used but the driver defaults to MMIO. + +5. Tagged command queueing + +Queuing more than 1 command at a time to a device allows it to perform +optimizations based on actual head positions and its mechanical +characteristics. This feature may also reduce average command latency. +In order to really gain advantage of this feature, devices must have +a reasonnable cache size (No miracle is to be expected for a low-end +hard disk with 128 KB or less). +Some kown old SCSI devices do not properly support tagged command queuing. +Generally, firmware revisions that fix this kind of problems are available +at respective vendor web/ftp sites. +All I can say is that I never have had problem with tagged queuing using +this driver and its predecessors. Hard disks that behaved correctly for +me using tagged commands are the following: + +- IBM S12 0662 +- Conner 1080S +- Quantum Atlas I +- Quantum Atlas II +- Seagate Cheetah I +- Quantum Viking II +- IBM DRVS +- Quantum Atlas IV +- Seagate Cheetah II + +If your controller has NVRAM, you can configure this feature per target +from the user setup tool. The Tekram Setup program allows to tune the +maximum number of queued commands up to 32. The Symbios Setup only allows +to enable or disable this feature. + +The maximum number of simultaneous tagged commands queued to a device +is currently set to 16 by default. This value is suitable for most SCSI +disks. With large SCSI disks (>= 2GB, cache >= 512KB, average seek time +<= 10 ms), using a larger value may give better performances. + +This driver supports up to 255 commands per device, and but using more than +64 is generally not worth-while, unless you are using a very large disk or +disk arrays. It is noticeable that most of recent hard disks seem not to +accept more than 64 simultaneous commands. So, using more than 64 queued +commands is probably just resource wasting. + +If your controller does not have NVRAM or if it is managed by the SDMS +BIOS/SETUP, you can configure tagged queueing feature and device queue +depths from the boot command-line. For example: + + sym53c8xx=tags:4/t2t3q15-t4q7/t1u0q32 + +will set tagged commands queue depths as follow: + +- target 2 all luns on controller 0 --> 15 +- target 3 all luns on controller 0 --> 15 +- target 4 all luns on controller 0 --> 7 +- target 1 lun 0 on controller 1 --> 32 +- all other target/lun --> 4 + +In some special conditions, some SCSI disk firmwares may return a +QUEUE FULL status for a SCSI command. This behaviour is managed by the +driver using the following heuristic: + +- Each time a QUEUE FULL status is returned, tagged queue depth is reduced + to the actual number of disconnected commands. + +- Every 200 successfully completed SCSI commands, if allowed by the + current limit, the maximum number of queueable commands is incremented. + +Since QUEUE FULL status reception and handling is resource wasting, the +driver notifies by default this problem to user by indicating the actual +number of commands used and their status, as well as its decision on the +device queue depth change. +The heuristic used by the driver in handling QUEUE FULL ensures that the +impact on performances is not too bad. You can get rid of the messages by +setting verbose level to zero, as follow: + +1st method: boot your system using 'sym53c8xx=verb:0' option. +2nd method: apply "setverbose 0" control command to the proc fs entry + corresponding to your controller after boot-up. + +6. Parity checking + +The driver supports SCSI parity checking and PCI bus master parity +checking. These features must be enabled in order to ensure safe data +transfers. However, some flawed devices or mother boards will have +problems with parity. You can disable either PCI parity or SCSI parity +checking by entering appropriate options from the boot command line. +(See 10: Boot setup commands). + +7. Profiling information + +This driver does not provide profiling informations as did its predecessors. +This feature was not this useful and added complexity to the code. +As the driver code got more complex, I have decided to remove everything +that didn't seem actually useful. + +8. Control commands + +Control commands can be sent to the driver with write operations to +the proc SCSI file system. The generic command syntax is the +following: + + echo " " >/proc/scsi/sym53c8xx/0 + (assumes controller number is 0) + +Using "all" for "" parameter with the commands below will +apply to all targets of the SCSI chain (except the controller). + +Available commands: + +8.1 Set minimum synchronous period factor + + setsync + + target: target number + period: minimum synchronous period. + Maximum speed = 1000/(4*period factor) except for special + cases below. + + Specify a period of 0, to force asynchronous transfer mode. + + 9 means 12.5 nano-seconds synchronous period + 10 means 25 nano-seconds synchronous period + 11 means 30 nano-seconds synchronous period + 12 means 50 nano-seconds synchronous period + +8.2 Set wide size + + setwide + + target: target number + size: 0=8 bits, 1=16bits + +8.3 Set maximum number of concurrent tagged commands + + settags + + target: target number + tags: number of concurrent tagged commands + must not be greater than configured (default: 16) + +8.4 Set debug mode + + setdebug + + Available debug flags: + alloc: print info about memory allocations (ccb, lcb) + queue: print info about insertions into the command start queue + result: print sense data on CHECK CONDITION status + scatter: print info about the scatter process + scripts: print info about the script binding process + tiny: print minimal debugging information + timing: print timing information of the NCR chip + nego: print information about SCSI negotiations + phase: print information on script interruptions + + Use "setdebug" with no argument to reset debug flags. + + +8.5 Set flag (no_disc) + + setflag + + target: target number + + For the moment, only one flag is available: + + no_disc: not allow target to disconnect. + + Do not specify any flag in order to reset the flag. For example: + - setflag 4 + will reset no_disc flag for target 4, so will allow it disconnections. + - setflag all + will allow disconnection for all devices on the SCSI bus. + + +8.6 Set verbose level + + setverbose #level + + The driver default verbose level is 1. This command allows to change + th driver verbose level after boot-up. + +8.7 Reset all logical units of a target + + resetdev + + target: target number + The driver will try to send a BUS DEVICE RESET message to the target. + +8.8 Abort all tasks of all logical units of a target + + cleardev + + target: target number + The driver will try to send a ABORT message to all the logical units + of the target. + + +9. Configuration parameters + +Under kernel configuration tools (make menuconfig, for example), it is +possible to change some default driver configuration parameters. +If the firmware of all your devices is perfect enough, all the +features supported by the driver can be enabled at start-up. However, +if only one has a flaw for some SCSI feature, you can disable the +support by the driver of this feature at linux start-up and enable +this feature after boot-up only for devices that support it safely. + +Configuration parameters: + +Use normal IO (default answer: n) + Answer "y" if you suspect your mother board to not allow memory mapped I/O. + May slow down performance a little. + +Default tagged command queue depth (default answer: 16) + Entering 0 defaults to tagged commands not being used. + This parameter can be specified from the boot command line. + +Maximum number of queued commands (default answer: 32) + This option allows you to specify the maximum number of tagged commands + that can be queued to a device. The maximum supported value is 255. + +Synchronous transfers frequency (default answer: 80) + This option allows you to specify the frequency in MHz the driver + will use at boot time for synchronous data transfer negotiations. + 0 means "asynchronous data transfers". + +10. Boot setup commands + +10.1 Syntax + +Setup commands can be passed to the driver either at boot time or as a +string variable using 'insmod'. + +A boot setup command for this driver begins with the driver name "sym53c8xx=". +The kernel syntax parser then expects an optionnal list of integers separated +with comma followed by an optional list of comma-separated strings. + +Example of boot setup command under lilo prompt: + +lilo: linux root=/dev/sda2 sym53c8xx=tags:4,sync:10,debug:0x200 + +- enable tagged commands, up to 4 tagged commands queued. +- set synchronous negotiation speed to 10 Mega-transfers / second. +- set DEBUG_NEGO flag. + +Since comma seems not to be allowed when defining a string variable using +'insmod', the driver also accepts as option separator. +The following command will install driver module with the same options as +above. + + insmod sym53c8xx.o sym53c8xx="tags:4 sync:10 debug:0x200" + +The integer list of arguments is discarded by the driver. + +Each string argument must be specified as "keyword:value". Only lower-case +characters and digits are allowed. + +10.2 Available arguments + +10.2.1 Master parity checking + mpar:y enabled + mpar:n disabled + +10.2.2 Scsi parity checking + spar:y enabled + spar:n disabled + +10.2.3 Default number of tagged commands + tags:0 (or tags:1 ) tagged command queuing disabled + tags:#tags (#tags > 1) tagged command queuing enabled + #tags will be truncated to the max queued commands configuration parameter. + This option also allows to specify a command queue depth for each device + that support tagged command queueing. + Example: + sym53c8xx=tags:10/t2t3q16-t5q24/t1u2q32 + will set devices queue depth as follow: + - controller #0 target #2 and target #3 -> 16 commands, + - controller #0 target #5 -> 24 commands, + - controller #1 target #1 logical unit #2 -> 32 commands, + - all other logical units (all targets, all controllers) -> 10 commands. + +10.2.4 Default synchronous period factor + sync:255 disabled (asynchronous transfer mode) + sync:#factor + #factor = 9 Ultra-3 SCSI 80 Mega-transfers / second (Wide only) + #factor = 10 Ultra-2 SCSI 40 Mega-transfers / second + #factor = 11 Ultra-2 SCSI 33 Mega-transfers / second + #factor < 25 Ultra SCSI 20 Mega-transfers / second + #factor < 50 Fast SCSI-2 + + In all cases, the driver will use the minimum transfer period supported by + controllers according to SYM53C8XX chip type. + +10.2.5 Verbosity level + verb:0 minimal + verb:1 normal + verb:2 too much + +10.2.6 Debug mode + debug:0 clear debug flags + debug:#x set debug flags + #x is an integer value combining the following power-of-2 values: + DEBUG_ALLOC 0x1 + DEBUG_PHASE 0x2 + DEBUG_POLL 0x4 + DEBUG_QUEUE 0x8 + DEBUG_RESULT 0x10 + DEBUG_SCATTER 0x20 + DEBUG_SCRIPT 0x40 + DEBUG_TINY 0x80 + DEBUG_TIMING 0x100 + DEBUG_NEGO 0x200 + DEBUG_TAGS 0x400 + DEBUG_FREEZE 0x800 + DEBUG_RESTART 0x1000 + + You can play safely with DEBUG_NEGO. However, some of these flags may + generate bunches of syslog messages. + +10.2.7 Burst max + burst:0 burst disabled + burst:255 get burst length from initial IO register settings. + burst:#x burst enabled (1<<#x burst transfers max) + #x is an integer value which is log base 2 of the burst transfers max. + By default the driver uses the maximum value supported by the chip. + +10.2.8 LED support + led:1 enable LED support + led:0 disable LED support + Donnot enable LED support if your scsi board does not use SDMS BIOS. + (See 'Configuration parameters') + +10.2.9 Max wide + wide:1 wide scsi enabled + wide:0 wide scsi disabled + Some scsi boards use a 875 (ultra wide) and only supply narrow connectors. + If you have connected a wide device with a 50 pins to 68 pins cable + converter, any accepted wide negotiation will break further data transfers. + In such a case, using "wide:0" in the bootup command will be helpfull. + +10.2.10 Differential mode + diff:0 never set up diff mode + diff:1 set up diff mode if BIOS set it + diff:2 always set up diff mode + diff:3 set diff mode if GPIO3 is not set + +10.2.11 IRQ mode + irqm:0 always open drain + irqm:1 same as initial settings (assumed BIOS settings) + irqm:2 always totem pole + +10.2.12 Reverse probe + revprob:n probe chip ids from the PCI configuration in this order: + 810, 815, 825, 860, 875, 885, 875A, 895, 896, 895A, + 1510D, 1010-33, 1010-66. + revprob:y probe chip ids in the reverse order. + +10.2.13 Fix up PCI configuration space + pcifix: